Kubernetes is an open-source container orchestration system for automating software deployment, scaling, and management.
➜ More things to do, less administrators
The way containers are designed, and particularly the way Docker is designed, the assumption is that the container is stateless.Mark Davis, ClusterHQ, 17 Jun 2015
Some tried early...
... And failed
It shouldn't be a reason not to try again!
Kubernetes 1.14 and persistent volumes
# Example of PostgreSQL cluster
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: cluster-example
spec:
instances: 3
storage:
size: 1Gi
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
# [...]
spec:
# [...]
imageName: ghcr.io/cloudnative-pg/postgresql:13.6
#[...]
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
# [...]
spec:
backup:
barmanObjectStore:
destinationPath: "[destination path here]"
s3Credentials:
accessKeyId:
name: aws-creds
key: ACCESS_KEY_ID
secretAccessKey:
name: aws-creds
key: ACCESS_SECRET_KEY
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
# [...]
spec:
postgresql:
parameters:
shared_buffers: "1GB"
auto_explain.log_min_duration: "10s"
pg_hba:
- host laetitia laetitia all scram-sha-256
# [...]
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
# [...]
resources:
requests:
memory: "32Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
# [...]
imageName
resources
kubectl logs
It depends...
Your Postgres database still needs